import { useAxios } from '@/hooks/web/useAxios'
const request = useAxios()
import { useCache } from '@/hooks/web/useCache'
const { wsCache } = useCache()

// 费用列表
export const spCostListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostList',
      data: data
    }
  })
}

// 新增
export const spCostAddAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostAddAdmin',
      data: data
    }
  })
}

// 查看
export const spCostSeeApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostSee',
      data: data
    }
  })
}

// 修改
export const spCostEditApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostEdit',
      data: data
    }
  })
}

// 查看资产列表
export const zcAssetSelectAdminApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'zcAssetSelectAdmin',
      data: data
    }
  })
}

// 删除
export const spCostDelApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostDel',
      data: data
    }
  })
}

// 明细
export const spCostDetailedListApi = (data: any) => {
  return request.post({
    url: 'index.php/api/common',
    headers: { token: wsCache.get('token') },
    data: {
      code: 'spCostDetailedList',
      data: data
    }
  })
}
